<html>

<head>
    <title>题目页面</title>
    <meta http-equiv="content-Type" content="tetx/html;charset-utf-8">

    <style>
        ul,
        li {
            list-style: none;
            margin-top: 20px;
            font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
            
        }
    </style>




</head>



<style type="text/css">
	body{
		background: url("img/preview.jpg") no-repeat center center fixed;
                
                -webkit-background-size: cover;
                -o-background-size: cover;                
                background-size: cover;
                -webkit-filter: opacity(100%);
                filter: opacity(100%)"
	}
	</style>
<body background="img/preview1.jpg">

    <div style="height: 100%; width: 100%;">
    <div style="height: 100%; width: 100%;" id="operList";></div>
</div>
    <script>
        var Oper = [{
            "name": "《草原就是我的家》是哪个民族的民歌？",
            "option": [
                "A.蒙古族",
                "B.傣族",
                "C.侗族",
            ],
            "answer": "参考答案：A.蒙古族",
            "type": "单选题",
            "optionNum": "3",
            "score": "2"

        }, {
            "name": "《草原就是我的家》是哪个民族的民歌？",
            "option": [
                "A.蒙古族",
                "B.傣族",
                "C.侗族",
            ],
            "answer": "参考答案：A.蒙古族",
            "type": "单选题",
            "optionNum": "3",
            "score": "2"
        }]

        window.onload = function () {
            console.log(Oper);
            var htmlstr = " <ul>";

            for (let index = 0; index < Oper.length; index++) {
                htmlstr += " <li style='font-weight: bold;'>" + Oper[index].name + " 【" + Oper[index].type + "】    分值【" + Oper[index].score + "】 </li>";
             
                for(let i = 0;i < Oper[index].option.length;i++){
                    htmlstr +="  <li>    <input type='radio' value='" + Oper[index].option[i]+"'name='"+ index + "'>"+Oper[index].option[i]+"</li>";
                }

                  htmlstr +=" <li>" + Oper[index].answer + "  </li>";
                  
            }
            htmlstr += " </ul>";

            document.getElementById("operList").innerHTML = htmlstr;


        }
    </script>

 


</body>

</html>